package com.itboye.textileexpres.util;

import android.os.CountDownTimer;
import android.widget.Button;

public class TimeCount extends CountDownTimer{
	
	
	private Button button;

	public TimeCount(long millisInFuture, long countDownInterval,Button button) {
		super(millisInFuture, countDownInterval);
		this.button=button;
	}



	@Override
	public void onFinish() {
		button.setText("重新验证");
		button.setClickable(true);
	}

	@Override
	public void onTick(long millisUntilFinished) {
		button.setClickable(false);
		button.setText(millisUntilFinished / 1000 + "秒");
		
	}

}
